/*
 * TransferableList.java
 *
 * Created on September 25, 2006, 9:58 AM
 *
 */
package org.letva.copie.common.message;

import java.awt.datatransfer.*;
import java.io.IOException;
import java.util.*;

/**
 *
 * @author Vuk Nikolic
 */
public class TransferableList implements Transferable {

	/** Creates a new instance of TransferableList */
	public TransferableList(List l) {
		list = l;
	}

	public DataFlavor[] getTransferDataFlavors() {
		DataFlavor[] df = {java.awt.datatransfer.DataFlavor.javaFileListFlavor};
		return df;
	}

	public boolean isDataFlavorSupported(DataFlavor flavor) {
		return flavor.equals(java.awt.datatransfer.DataFlavor.javaFileListFlavor);
	}

	public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException {
		return list;
	}
	List list;
}
